local M = {}

local toDegFunc = math.deg
--[[获取两点组成的线段的倾斜角度
	beginPos vector2类型
	endPos vector2类型
]]
function M.getRotation(begPos, endPos)
	local diffX = endPos.x - begPos.x
	local diffY = endPos.y - begPos.y

	return toDegFunc(math.atan2(diffY, diffX))
end

return M